package
{
	import com.mcglib.flac.ButtonGroup;
	import com.mcglib.flac.FlacEvent;
	
	import flash.display.Sprite;
	
	public class ButtonGroupTest extends Sprite
	{
		private var group:ButtonGroup = new ButtonGroup;
		
		public function ButtonGroupTest()
		{
			super();
			
			var ui:buttonGroup_ui = new buttonGroup_ui;
			group.registerButton(ui.btn1);
			group.registerButton(ui.btn2);
			group.registerButton(ui.btn3);
			group.registerButton(ui.btn4);
			group.curButton = ui.btn1;
			group.addEventListener(FlacEvent.VALUE_CHANGE,onSelectedChange);
			
			addChild(ui);			
		}
		
		private function onSelectedChange(e:FlacEvent):void{
			trace(group.curButton.name);
		}
	}
}